package com.scu.phototabuser.ui.login.login;


import com.scu.phototabuser.BasePresenter;
import com.scu.phototabuser.BaseView;

/**
 * View和Presenter的规范
 *@Author tianff[tianff.scu@gmail.com]
 */
public interface LoginContract {

    interface LoginView extends BaseView<Presenter> {

        void showEmailFromSignUp(String email);

        void jumpToHome();

        void setProgressBarVisibility(boolean visibility);

    }

    interface SingUpView extends BaseView<Presenter>{

        void backToLoginView();

    }

    interface Presenter extends BasePresenter {

        void saveIsNeedLogin(boolean needDoLogin);

        void setProgressBarVisibility(boolean visibility);

        void doLogin(String email, String MD5pass, LoginCallback callback);

        void doSignUp(String email,String MD5pass,LoginCallback callback);

    }


    //注册界面完成注册时在登录界面中回调，显示注册的email
    interface showEmailCallback{
        void showEmail(String email);
    }

    interface LoginCallback{

        void showSuccess();

        void showFailed(Integer code,String msg);

    }


}
